//
//  NavViewController.swift
//  TalkeTv
//
//  Created by lhf on 2024/9/19.
//

import UIKit

class NavViewController: UINavigationController, UINavigationControllerDelegate {
    
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        if self.children.count > 0 {
            let font = UIFont.systemFont(ofSize: 18.0, weight: .semibold)
            let textAttributes = [NSAttributedString.Key.font:font,NSAttributedString.Key.foregroundColor:AppConfig.sharedInstance.MAIN_TITLE_COLOR]
            navigationBar.titleTextAttributes = textAttributes
            
            viewController.hidesBottomBarWhenPushed = true;
        }
        super.pushViewController(viewController, animated: true)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.delegate = self
        
        // Do any additional setup after loading the view.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
